package jdk8特性_壹证通公司面试.lambda.Function接口;

import java.util.function.Function;

/**
 * Created by hongcaixia on 2019/10/30.
 */
public class MyFunction {

    public static void change(String str,
                              Function<String,Integer> fun1,
                              Function<Integer,String> fun2){

        String string = fun1.andThen(fun2).apply(str);
        System.out.println(string);
    }

    public static void main(String[] args) {
        change("123",str->Integer.parseInt(str)+999,i->i+"害嗨嗨");
    }
}